package com.wang.user.controller;

import com.wang.appuser.api.model.AuthDto;
import com.wang.common.model.dto.ResponseResult;
import com.wang.user.service.AuditUserService;
import com.wang.wemedia.api.model.dto.NewsAuthDto;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户数据审核
 *
 * @author WN
 * @date：2024/03/11 18:34
 */
@RestController
@RequestMapping("/api/v1/auth")
@RequiredArgsConstructor
public class AuditUserController {

    private final AuditUserService auditUserService;

    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto authDto){
        return auditUserService.list(authDto);
    }

    /**
     * 审核通过
     *
     * @return responseResult
     */
    @PostMapping("/auth_pass")
    public ResponseResult authPass(@RequestBody AuthDto dto){
        return auditUserService.authPass(dto);
    }

    /**
     * 审核不通过
     *
     * @return responseResult
     */
    @PostMapping("/auth_fail")
    public ResponseResult authFail(@RequestBody AuthDto dto){
        return auditUserService.authFail(dto);
    }
}
